<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>02_案例练习-合并数组-在新数组中合并</title>
    </head>
    <body>
        <script>
            var arr = [1,2,3,4,5];

            var arr1 = [6,7,8,9,10];

            var new_arr = [];

            for(var i = 0; i < arr.length; i++) {
                new_arr[new_arr.length] = arr[i];
            }

            for(var j = 0; j < arr1.length; j++) {
                new_arr[new_arr.length] = arr1[j];
            }

            console.log(new_arr);
        </script>
    </body>
</html>